﻿@using InnovaApp.Layers.ResourcesLayer.Properties
@model InnovaApp.Portals.MVC4Portal.Models.MetaModels.Order_MetaModel
<div class="notDisplayed">
	@Html.HiddenFor(m => m.Id, new { @id = "hidId" })
	@Html.HiddenFor(m => m.OrderRef, new { @id = "hidOrderRef" })
</div>
<div>
	@Html.Partial("_ContactViewer", Model.CurrentContact)
</div>
<div>
	@Resources.View_Order_SelectYourDeliveryMode @Html.DropDownListFor(m => m.FK_DeliveryMode, Model.DeliveryModes, new { @id = "ddlDeliveryModes" })
	<div id="divDeliveryModeDescription">
	</div>
</div>
<div class="divAddresses orderDivWith">
	<div id="divDeliveryAddressContainer" class="divAddress addressDivWith">
		<div class="AddressCaption">
			@Resources.View_Order_DeliveryAddressBlocCaption @Html.DropDownList("ddlDeliveryAddress", Model.DeliveryAddresses, new { @class = "ddlAddress" })
		</div>
		@Html.TextAreaFor(m => m.DeliveryAddress, new { @class = "txtAddress k-input rounded5", id = "txtDeliveryAddress" })
	</div>
	<div id="divInvoicingAddressContainer" class="divAddress addressDivWith">
		<div class="AddressCaption">
			@Resources.View_Order_InvoiceAddressBlocCaption @Html.DropDownList("ddlInvoiceAddress", Model.InvoicingAddresses, new { @class = "ddlAddress" })
		</div>
		@Html.TextAreaFor(m => m.InvoiceAddress, new { @class = "txtAddress k-input rounded5", id = "txtInvoiceAddress" })
	</div>
</div>
<div id="divOrderDetailContainer" class="k-widget OrderDetailContainer rounded5">
	<table class="tblDetails">
		<thead>
			<tr>
				<th>
					@Html.LabelFor(m => m.Details[0].Quantity)
				</th>
				<th>
					@Html.LabelFor(m => m.Details[0].FK_Product)
				</th>
				<th>
					@Html.Label(@Resources.View_Order_ProductDescriptionColumnCaption)
				</th>
				<th>
					@Html.LabelFor(m => m.Details[0].UnitPrice)
				</th>
				<th>
					@Html.LabelFor(m => m.Details[0].TotalPrice)
				</th>
				<th>
					@Html.LabelFor(m => m.Details[0].AppliedVATRate)
				</th>
				<th>
					@Html.LabelFor(m => m.Details[0].VatTotal)
				</th>
				<th>
					@Html.LabelFor(m => m.Details[0].AllTaxeIncludedTotal)
				</th>
				<th>
				</th>
			</tr>
			@Html.EditorFor(m => m.NewRow)
		</thead>
		<tbody>
			@Html.EditorFor(m => m.Details)
		</tbody>
		<tfoot>
			<tr>
				<td colspan="9">
					@Html.EditorFor(m => m.Totals)
				</td>
			</tr>
		</tfoot>
	</table>
</div>
